home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / poly3d-h / program.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-15  |  2.5 KB  |  80 lines

  1. /*****************************************************************************
  2. * Definitions for the Poly3D-H program:                                      *
  3. *****************************************************************************/
  4.  
  5. #ifndef POLY_3D_H_H
  6. #define POLY_3D_H_H
  7.  
  8. #include "irit_sm.h"
  9. #include "genmat.h"
  10. #include "iritprsr.h"
  11. #include "iritgrap.h"
  12. #include "attribut.h"
  13. #include "allocate.h"
  14. #include "cagd_lib.h"
  15. #include "symb_lib.h"
  16.  
  17. #ifdef  EPSILON
  18. #undef  EPSILON
  19. #endif  /* EPSILON */
  20. #define EPSILON    1e-4  /* Make it smaller if you changed to double precision. */
  21.  
  22. #define  EDGE_HASH_TABLE_SIZE    500 /* Number of entries in edge hash table. */
  23. #define  EDGE_HASH_TABLE_SIZE1    499             /* One below the above. */
  24. #define  EDGE_HASH_TABLE_SIZE2    250               /* Half of above. */
  25. #define  POLY_HASH_TABLE_SIZE    500 /* Number of entries in poly hash table. */
  26. #define  POLY_HASH_TABLE_SIZE1    499             /* One below the above. */
  27. #define  POLY_HASH_TABLE_SIZE2    250               /* Half of above. */
  28.  
  29. #define  VISIBLE_COLOR    IG_IRIT_YELLOW /* Color to draw visible line result. */
  30. #define  HIDDEN_COLOR    IG_IRIT_BLUE    /* Color to draw hidden line result. */
  31. #define  HIDDEN_COLOR_RATIO    2         /* Color to dim visible RGB color. */
  32.  
  33. #define  VISIBLE_WIDTH        0.05
  34. #define  HIDDEN_WIDTH_RATIO    10
  35.  
  36. #define  DEFAULT_FINENESS    4      /* Default fineness of srf subdiv. */
  37.  
  38. typedef struct EdgeStruct {
  39.     struct EdgeStruct *Pnext;
  40.     IPVertexStruct *Vertex[2];               /* The two edge vertices. */
  41.     unsigned char Internal;           /* If edge is Internal (IRIT output). */
  42. } EdgeStruct;
  43.  
  44. /* The following are global setable variables (via config file poly3d-h.cfg) */
  45. extern int
  46.     GlblMore,
  47.     GlblClipScreen,
  48.     GlblQuiet,
  49.     GlblOutputHasRGB,
  50.     GlblOutputRGB[3],
  51.     GlblOutputColor,
  52.     GlblNumEdge,
  53.     GlblBackFacing,
  54.     GlblInternal,
  55.     GlblOutputHiddenData,
  56.     NumOfPolygons;              /* Total number of polygons to handle. */
  57.  
  58. extern RealType
  59.     GlblOutputWidth;
  60.  
  61. /* Global transformation matrix: */
  62. extern MatrixType
  63.     GlblViewMat;               /* Current view/persp. of object. */
  64.  
  65. /* Data structures used by the hidden line modules: */
  66. extern int EdgeCount;
  67. extern EdgeStruct *EdgeHashTable[];
  68. extern IPPolygonStruct *PolyHashTable[];
  69.  
  70. /* And finally the prototypes of the Poly3D-H.c module: */
  71. void Poly3dhExit(int ExitCode);
  72.  
  73. /* Prototypes of the PrepData.c module: */
  74. void PrepareViewData(IPObjectStruct *Objects);
  75.  
  76. /* Prototypes of the Out-Edge.c module: */
  77. void OutVisibleEdges(FILE *OutFile);
  78.  
  79. #endif /* POLY_3D_H_H */
  80.